:root {
  --white: #fff;
  // --active-color: #00aeb0;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--active-color);
  transition: background 0.4s ease;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

input[type='range'] {
  width: 100%;
  height: 5px;
  margin-bottom: 10px;
  background: #3b7677;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-appearance: none;
}

.audio-player {
  display: flex;
  align-items: center;
  max-width: 500px;
  height: 95px;
  margin: auto;
  padding: 24px;
  color: var(--white);
  background-color: rgba(249, 249, 252, 1);
  border-radius: 20px;
  box-shadow: 0 28px 28px rgba(0, 0, 0, 0.2);
}

.artwork {
  display: block;
  width: 46px;
  height: 46px;
  margin: auto;
  border-radius: 10px;
}

.track-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  text-align: center;
}

.title {
  width: 200px;
  margin-bottom: 4px;
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.artist {
  margin-top: 0;
  color: rgba(122, 122, 122, 1);
  font-weight: 300;
}

.audio-controls {
  display: flex;
  justify-content: space-between;
  width: 75%;
  margin: 0 auto 15px;
}

.audio-controls .prev svg,
.audio-controls .next svg {
  width: 35px;
  height: 35px;
}

.audio-controls .play svg,
.audio-controls .pause svg {
  width: 40px;
  height: 40px;
}

.audio-controls path {
  fill: var(--white);
}

.color-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(45deg, var(--active-color) 20%, transparent 100%) no-repeat;
}

.color-backdrop.playing {
  animation: colorChange 20s alternate infinite;
}

@keyframes colorChange {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

.audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.audio-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.progress {
  border: 0.1px solid lightgray;
}

.play svg,
.pause svg {
  width: 25px !important;
  height: 25px !important;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 10px;
}

input[type='range']:focus {
  outline: none;
}

// 使滑块超出轨道部分的偏移量相等
input[type='range']::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  background-color: rgba(23, 117, 245, 1);
  border: solid 2px white;
  border-radius: 50%;
  -webkit-appearance: none;
}
